#ifndef DATAFILE_H_
#define DATAFILE_H_

#include "System\F2806x_Device.h"

struct SDataFile
{
	// Input Data
	Uint32 Mode;
	bool AckError;
	float GyroX;
	float GyroY;
	float GyroZ;
	float Roll;
	float Pitch;
	float Yaw;
	float MagX;
	float MagY;
	float MagZ;
	float SonicCM; //[cm]
	float IRFarCM; //[cm]
	float AbsPressurePa; // [Pa]
	float64 gpsLatitude; // N/A
	float64 gpsLongitude; // N/A
	float XeX;
	float XeY;
	float gpsAltitude;
	float gpssatCount;
	float VelX;
	float VelY;
	bool gpsReceived;


	float JoyRollRef; // -1...+1
	float JoyPitchRef; // -1...+1
	float JoyYawRef; // -1...+1
	float JoyThrottleRef; // 0...+1
	float64 targetGpsLatitude; // N/A
	float64 targetGpsLongitude; // N/A
	float XeXRef;
	float XeYRef;

	// Output Data
	Uint32 ActualMode;
	bool Failed;
	float PWM1;
	float PWM2;
	float PWM3;
	float PWM4;
	float MagYaw;
	float AltF;
	float VertSpeed;

	// OtherData
	float BattVoltage;

	// Internal
	long KillCounter;

	// Status
	long Counter;
	float LoopTimeMS; // [ms]
	float LoopTimeMSMAX; // [ms]
	float64 MissionTime; // [s]
};

#endif /*DATAFILE_H_*/
